package com.jxzyk.entity.tree;

import java.util.ArrayList;
import java.util.List;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.core.entity.JsonEntity;

public class Tree extends JsonEntity {
	private String outlineid;
	private List<Outlines> children = new ArrayList<>();
	private String outlinetitle;

	public Tree() {
		super();
	}

	public Tree(JSONObject json) {
		super();
		setOutlineid(json.getString("outlineid"));
		setOutlinetitle(json.getString("outlinetitle"));
		JSONArray childrens = json.getJSONArray("children");
		for (int i = 0; i < childrens.size(); i++) {
			children.add(new Outlines(childrens.getJSONObject(i)));
		}
	}

	public String getOutlineid() {
		return outlineid;
	}

	public void setOutlineid(String outlineid) {
		this.outlineid = outlineid;
	}

	public List<Outlines> getChildren() {
		return children;
	}

	public void setChildren(List<Outlines> children) {
		this.children = children;
	}

	public String getOutlinetitle() {
		return outlinetitle;
	}

	public void setOutlinetitle(String outlinetitle) {
		this.outlinetitle = outlinetitle;
	}

}
